package priv.pront.code.mati.province;

import java.util.Scanner;

/**
 * @Description:
 * @Author: pront
 * @Time:2023-11-17 10:53
 */
public class MC0208_神器宝盒 {

    static int n;
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        n = scanner.nextInt();
        double ans = n / 10.0;
        if (ans == (int) ans) {
            System.out.println(0);
        }else{
            System.out.println(2 * n);
        }
    }
}
